<?php

namespace app\services;

use plugin\admin\app\model\GoodsCategory;

class GoodsCategoryService
{
    public static function list()
    {
        $list = GoodsCategory::select(['id', 'thumb', 'mobile_show_name'])->where('is_show', 1)->orderBy('sort')->get()->toArray();

        foreach ($list as $key=>$value) {
            $value['thumb'] = full_url($value['thumb']);
            $list[$key] = $value;
        }

        return $list;
    }
}